
SET ZIP_APP_PATH=C:\Program Files\7-Zip\7z.exe

SET NETWORKPATH=%~dp0

SET FILENAME=%1%
SET PUBLISH_PATH=%NETWORKPATH%%2%
IF "%3"=="1" SET PUBLISH_PATH=%NETWORKPATH%

IF EXIST "%PUBLISH_PATH%%FILENAME%.zip" DEL "%PUBLISH_PATH%%FILENAME%.zip"
"%ZIP_APP_PATH%" a -tzip "%PUBLISH_PATH%%FILENAME%.zip" "%NETWORKPATH%%FILENAME%"
EXIT
